   // 轮播图交互逻辑
        document.addEventListener('DOMContentLoaded', function() {
            const bannerSlides = document.querySelector('.banner-slides');
            const indicatorsContainer = document.querySelector('.banner-indicators');
            const slides = document.querySelectorAll('.banner-slide');
            let currentSlide = 0;
            let autoPlay;

            // 创建指示器
            slides.forEach((_, index) => {
                const indicator = document.createElement('div');
                indicator.className = 'banner-indicator' + (index === 0 ? ' active' : '');
                indicator.addEventListener('click', () => {
                    setSlide(index);
                    resetAutoPlay();
                });
                indicatorsContainer.appendChild(indicator);
            });

            // 切换幻灯片函数
            function setSlide(index) {
                currentSlide = (index + slides.length) % slides.length;
                bannerSlides.style.transform = `translateX(-${currentSlide * 100}%)`;
                document.querySelectorAll('.banner-indicator').forEach((ind, i) => {
                    ind.classList.toggle('active', i === currentSlide);
                });
            }

            // 自动轮播
            function startAutoPlay() {
                autoPlay = setInterval(() => {
                    setSlide(currentSlide + 1);
                }, 5000);
            }

            function resetAutoPlay() {
                clearInterval(autoPlay);
                startAutoPlay();
            }

            startAutoPlay();

            // 鼠标悬停暂停
            bannerSlides.parentElement.addEventListener('mouseenter', () => clearInterval(autoPlay));
            bannerSlides.parentElement.addEventListener('mouseleave', startAutoPlay);

            // 导航按钮事件
            document.querySelector('.banner-prev').addEventListener('click', () => {
                setSlide(currentSlide - 1);
                resetAutoPlay();
            });
            document.querySelector('.banner-next').addEventListener('click', () => {
                setSlide(currentSlide + 1);
                resetAutoPlay();
            });

            // 键盘导航
            document.addEventListener('keydown', (e) => {
                if (e.key === 'ArrowLeft') {
                    setSlide(currentSlide - 1);
                    resetAutoPlay();
                } else if (e.key === 'ArrowRight') {
                    setSlide(currentSlide + 1);
                    resetAutoPlay();
                }
            });
        });